
class Animal{
    public String name;
    public int age;

    public Animal() {
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }


    public void eat() {
        System.out.println(name + "正在吃饭！");
    }
    public void bark(){
        System.out.println(name+"叫");
    }


}

class Dog extends Animal{
    public float weight;

    public Dog() {

    }

    public Dog(String name, int age){

        super(name,age);

    }



}

class Cat extends Animal{


    public Cat(String name,int age) {

        super(name,age);

    }
}




public class Test {
    public static void main(String[] args) {

        Dog dog1 =new Dog();

        Dog dog =new Dog("狗",18);
        dog.eat();

        System.out.println("=======================");
        Cat cat =new Cat("猫",18);
        cat.eat();




    }
}
